package com.deram.ctin.serv.business.impl;

import com.deram.ctin.common.bean.PageResult;
import com.deram.ctin.serv.business.api.BusinessJudicialSaleApi;
import com.deram.ctin.serv.business.entity.BaseUpdateInfo;
import com.deram.ctin.serv.business.entity.BusinessJudicialSale;
import com.deram.ctin.serv.business.filter.BusinessJudicialSaleFilter;
import com.deram.ctin.serv.business.service.BusinessJudicialSaleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @Author: jtt
 * @Description:
 * @Date: 2017/9/13 15:58
 * @version: V1.0
 */
@RestController
public class BusinessJudicialSaleApiImpl implements BusinessJudicialSaleApi {

    @Autowired
    BusinessJudicialSaleService businessJudicialSaleService;

    @Override
    public List<BusinessJudicialSale> list(@RequestBody BusinessJudicialSaleFilter filter) {
        return businessJudicialSaleService.list(filter);
    }

    @Override
    public BusinessJudicialSale save(@RequestBody BusinessJudicialSale param) {
        return businessJudicialSaleService.save(param);
    }

    @Override
    public void delete(Long id) {
        businessJudicialSaleService.delete(id);
    }

    @Override
    public void saveList(@RequestBody BaseUpdateInfo<BusinessJudicialSale> updateInfo) {
        businessJudicialSaleService.saveList(updateInfo);
    }

    @Override
    public PageResult<BusinessJudicialSale> search(@RequestBody BusinessJudicialSaleFilter filter, @RequestParam("pageNo") Integer pageNo, @RequestParam("pageSize") Integer pageSize) {
        return businessJudicialSaleService.search(filter, pageNo, pageSize);
    }
}
